<template>
<div>
    <Tabs value="name1">
        <TabPane label="新的投递" name="name1">
            <Table border :columns="role_table.columns" :data="list"></Table>
        </TabPane>
        <TabPane label="正在约谈" name="name2">标签二的内容</TabPane>
        <TabPane label="已达成" name="name3">标签三的内容</TabPane>
        <TabPane label="已取消" name="name4">标签三的内容</TabPane>
    </Tabs>
    <AutoPage v-model="page"></AutoPage>
</div>
</template>
<script>
    import Page from '@/common/model/Page'
    import AutoPage from '@/common/components/AutoPage'

    export default {
        data(){
            return{
                page: new Page("abutment/receive_list", {status:1}),
                role_table: {
					columns: [
						{ title: 'ID', key: 'id' },
						{ title: '融资者', render: (h, params) => {
							return h('div', [
								h('Icon', {
									props: { type: 'person' }
								}),
								h('strong', params.row.finance_member.username)
							]);
						}},
						{ title: '融资项目', render: (h, params) => {
							return h('div', [
								h('strong', params.row.finance.title)
							]);
						}},
						{ title: '操作', key: 'action', width: 150, align: 'center', render: (h, params) => {
							return h('div', [
								h('Button', {
									props: { type: 'primary', size: 'small' },
									style: { marginRight: '5px' },
									on: { click: () => { this.handleInterview(params.index) } }
								}, '接受投递并约谈'),
								h('Button', { 
									props: { type: 'error', size: 'small' },
									on: { click: () => { this.handleAgree(params.index) } }
								}, '拒绝投递')
							]);
						}}
					],
					current: {},
				},
            }
        },
        components: {
            AutoPage
        },
        computed: {
            list(){
                return this.page.list;
            }
        },
        methods: {
            handleInterview(index){

            },
            handleAgree(index){

            },
        }
    }
</script>
